﻿using System;
namespace BZZ.Model
{
	/// <summary>
	/// 分类管理实体类：cata 。
	/// </summary>
	[Serializable]
	public class cata
	{
		public cata()
		{}

		#region Model
		private int _id; //id
		private int _pid; //父id
		private string _title; //类型名称
		private string _about; //说明
		private int _sortid; //排序


        /// <summary>
		/// id
		/// </summary>
		public int id
		{
			set{ _id=value;}
			get{return _id;}
		}
        /// <summary>
		/// 父id
		/// </summary>
		public int pid
		{
			set{ _pid=value;}
			get{return _pid;}
		}
        /// <summary>
		/// 类型名称
		/// </summary>
		public string title
		{
			set{ _title=value;}
			get{return _title;}
		}
        /// <summary>
		/// 说明
		/// </summary>
		public string about
		{
			set{ _about=value;}
			get{return _about;}
		}
        /// <summary>
		/// 排序
		/// </summary>
		public int sortid
		{
			set{ _sortid=value;}
			get{return _sortid;}
		}
		#endregion Model

		#region txt document
		/*
分类管理,cata
id,父id,类型名称,说明,排序
id,pid,title,about,sortid
i,i,c100,c200,i

--------------------------
-- 创建表[分类管理]开始: 
-- alter table  [BZZ_cata] add
-- IF EXISTS (SELECT 1 FROM sysobjects WHERE xtype='u' AND name='BZZ_cata') drop table BZZ_cata
  CREATE TABLE [BZZ_cata] (
	 [id] integer IDENTITY (1, 1) PRIMARY KEY NOT NULL ,
	 [pid] int,
	 [title] [varchar] (100),
	 [about] [varchar] (200),
	 [sortid] int
  )

 exec sp_addextendedproperty N'MS_Description',N'分类管理 ',N'user',N'dbo',N'table',N'BZZ_cata', NULL, NULL
 exec sp_addextendedproperty N'MS_Description',N'id',N'user',N'dbo',N'table',N'BZZ_cata',N'column',N'id'
 exec sp_addextendedproperty N'MS_Description',N'父id',N'user',N'dbo',N'table',N'BZZ_cata',N'column',N'pid'
 exec sp_addextendedproperty N'MS_Description',N'类型名称',N'user',N'dbo',N'table',N'BZZ_cata',N'column',N'title'
 exec sp_addextendedproperty N'MS_Description',N'说明',N'user',N'dbo',N'table',N'BZZ_cata',N'column',N'about'
 exec sp_addextendedproperty N'MS_Description',N'排序',N'user',N'dbo',N'table',N'BZZ_cata',N'column',N'sortid'

-- 创建表[分类管理]结束。 
--------------------------

		*/
		#endregion document
	}
}

